import com.yomahub.liteflow.script.ScriptExecuteWrap;
import com.yomahub.liteflow.script.body.JaninoCommonScriptBody;
import com.yomahub.liteflow.spi.holder.ContextAwareHolder;
import org.hzandyy.framework.liteflow.script.ScriptService;

public class ScriptCallSpringContext implements JaninoCommonScriptBody {

    @Override
    public Void body(ScriptExecuteWrap wrap) {
        // 此处类型必须强转
        ScriptService scriptService = (ScriptService) ContextAwareHolder.loadContextAware().getBean(ScriptService.class);

        scriptService.call("call spring bean");
        scriptService.fun();
        scriptService.funWithout();

        return null;
    }

}
